//
//  ChoseTypeWithChuSHouCell.m
//  EnterpriseEdition
//
//  Created by ypj on 2021/10/10.
//

#import "ChoseTypeWithChuSHouCell.h"

@implementation ChoseTypeWithChuSHouCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(CGFloat)cellHeight{
    return 70;
}
+(NSString *)reuseIdentifier{
    return @"ChoseTypeWithChuSHouCell";
}
- (IBAction)noButtonClick:(UIButton *)sender {
    if (sender.selected==YES) {
         self.sureButton.selected=YES;
        [self.sureButton setImage:[UIImage imageNamed:@"small_select_icon"] forState:UIControlStateNormal];
    } else {
         self.sureButton.selected=NO;
       
        [self.sureButton setImage:[UIImage imageNamed:@"small_unSelect_icon"] forState:UIControlStateNormal];
        [self.noButton setImage:[UIImage imageNamed:@"small_select_icon"] forState:UIControlStateNormal];
    }
     self.choseType=@"2";
    self.ToSendValue(self.choseType);
    [self refreshShopGetOrderAutoFlag];
}

- (IBAction)sureButtonClick:(UIButton *)sender {
    if (sender.selected==YES){
         self.noButton.selected=YES;
        [self.noButton setImage:[UIImage imageNamed:@"small_select_icon"] forState:UIControlStateNormal];

    } else {
         self.noButton.selected=NO;
        [self.noButton setImage:[UIImage imageNamed:@"small_unSelect_icon"] forState:UIControlStateNormal];
        [self.sureButton setImage:[UIImage imageNamed:@"small_select_icon"] forState:UIControlStateNormal];
    }
     self.choseType=@"1";
    self.ToSendValue(self.choseType);
    [self refreshShopGetOrderAutoFlag];
}
-(void)refreshShopGetOrderAutoFlag{
    if ([self.choseType isEqualToString:@"1"]) {
     
        [self.noButton setImage:Image(@"small_unSelect_icon") forState:UIControlStateNormal];
        [self.sureButton setImage:Image(@"small_select_icon") forState:UIControlStateNormal];
        self.noButton.selected=NO;
    } else {
        self.sureButton.selected=NO;
        [self.sureButton setImage:Image(@"small_unSelect_icon") forState:UIControlStateNormal];
        [self.noButton setImage:Image(@"small_select_icon") forState:UIControlStateNormal];
    }
}
@end
